<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateSlideshowsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('slideshows', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('title', 255)->index()->comment('标题');
            $table->text('imgurl')->nullable()->comment('图片');
            $table->string('path', 255)->nullable()->comment('链接地址');
            $table->unsignedTinyInteger('is_show')->default(1)->comment('是否显示 1 显示 0 不显示');
            $table->integer('order')->default(1)->comment('排序');
            $table->unsignedTinyInteger('status')->default(0)->comment('0 轮播图，1活动图');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('slideshows');
    }
}
